<template>
	<web-view style="width: 100%;" :src="url" @message="handleWebViewMessage"
		@onPostMessage="handleWebViewMessage"></web-view>
</template>

<script setup>
	import {
		ref,
		onMounted
	} from 'vue';

	import {
		request
	} from '@/utils/request'
	import {
		onLoad
	} from '@dcloudio/uni-app';
	
	const url = ref()

	onLoad(async (options) => {
		console.log("options", options.url);

		url.value = decodeURIComponent(options.url)
		console.log("url", url.value)
	})


	const handleWebViewMessage = async (e) => {
		console.log("e.detail", e.detail)
	};
</script>

<style lang="scss" scoped>
	.boxs {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.4);
		z-index: 100;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>